package demo;

public class Person {
    String name;
    String sex;
    int age;
    // 定义构造方法
//    public Person(String name,String sex,int age){
//        this.name = name;
//        this.sex = sex;
//        this.age = age;
//    }
    public Person(){
        this.name = "小明";
        this.sex = "男";
        this.age = 10;
    }


    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                '}';
    }

}
